package site.addzero.util

import org.koin.core.annotation.Single
import site.addzero.cli.config.configService

@Single
class StatusPrinter {
    fun printCurrentStatus() {
        val currentConfig = configService.currentPlatformConfig
        println("\n当前已配置的软连接:")
        if (currentConfig.links.isEmpty()) {
            println("  暂无软连接配置")
        } else {
            currentConfig.links.forEach { link ->
                println("  ${link.source} -> ${link.target}")
            }
        }

        println("\n当前已纳入同步的软件包:")
        if (currentConfig.defaultPackages.isEmpty()) {
            println("  暂无软件包配置")
        } else {
            currentConfig.defaultPackages.forEach { pkg ->
                println("  $pkg")
            }
        }
        println("")
    }
}